package cqie.frame.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 评价指标(EvaluateTarget)表实体类
 *
 * @author makejava
 * @since 2021-10-08 10:40:43
 */
@SuppressWarnings("serial")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("evaluate_target")
@ApiModel(description = "评价指标表")
public class EvaluateTarget extends Model<EvaluateTarget> {
    //Id
    @TableId(value = "id",type = IdType.AUTO)
    @TableField(value = "id")
    @ApiModelProperty(value = "ID")
    private Long id;
    //指标名称
    @TableField(value = "name")
    @ApiModelProperty(value = "评价指标名称")
    private String name;
    //排序码
    @TableField(value = "sortCode")
    @ApiModelProperty(value = "评价指标排序")
    private Integer sortCode;
    //权重
    @TableField(value = "weight")
    @ApiModelProperty(value = "评价指标权重")
    private BigDecimal weight;
    //上级指标Id
    @TableField(value = "parentId",strategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "上级指标Id")
    private Long parentId;
    //评价类型Id
    @TableField(value = "evaluateTypeId")
    @ApiModelProperty(value = "评价类型Id")
    private Long evaluateTypeId;
    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
    }

